package com.qianfeng.smartplatform.mapper;/*
 *@Description:
 *@author:赵健
 *@Date:zjzzz 2022/9/7 16:41
 */

import com.qianfeng.smartplatform.pojo.SysUserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface UserMapper {
    @Insert("INSERT INTO sys_user_info (username,password,pwd_salt,`name`,phone,email,sex,create_by,remark) VALUES (#{username},#{password},#{pwdSalt},#{name},#{phone},#{email},#{sex},#{createBy},#{remark})")
    void addUser(SysUserInfo sysUserInfo);

    List<SysUserInfo> findByUserNameOrPhoneOrEmail(@Param("userName") String userName, @Param("phone") String phone, @Param("email") String email);

    SysUserInfo findUserByName(String userName);

    void updateLoginDataByUserId(@Param("uId") Long uId,@Param("ip")  String ip);
}
